Skip to content

Conversation

noamr
Copy link
Collaborator

@noamr noamr commented Sep 24, 2025

Add NavigationTransition.to, exposing the current navigate event's destination.

This was not necessary before as navigations were committed synchronously, but with precommit handlers this
exposes information about an ongoing navigation.

The destination is set when the NavigationTransition object is created, and remains stable throughout.

Closes #11690.

(See WHATWG Working Mode: Changes for more details.)


/nav-history-apis.html ( diff )

@noamr noamr changed the title Navigation transition to Add NavigationTransition.to, exposing the current navigate event's destination Sep 24, 2025
@noamr noamr force-pushed the navigation-transition-to branch from 3336abd to 50e0a20 Compare September 24, 2025 12:15
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was easier than I thought it would be, nice.

source Outdated
<dt><code data-x=""><span data-x="dom-navigation">navigation</span>.<span data-x="dom-Navigation-transition">transition</span>.<span subdfn data-x="dom-NavigationTransition-to">to</span></code></dt>
<dd><p>The <code>NavigationDestination</code> of the transition. This can be useful to compare
against <code data-x="dom-Navigation-currentEntry">navigation.currentEntry</code> before the
navigation is <span data-x="concept-NavigationTransition-committed">committed</span>.</p></dd>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: "compare against" makes it sound like === will work, which it will not. I'm not sure what the best rephrasing is...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something along the lines of competing the different properties of the entry and destination

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reworded a bit

@noamr noamr force-pushed the navigation-transition-to branch from 50e0a20 to 7036eef Compare September 25, 2025 08:27
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 25, 2025
This exposes the destination of an ongoing navigation.

Spec PR: whatwg/html#11692
I2P: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/68d4ff4d.2b0a0220.29ae18.0091.GAE%40google.com

[email protected]

Bug: 447171238
Change-Id: I1d2fbb7c0b7f2656ca4392be4d1beac34d9012ac
aarongable pushed a commit to chromium/chromium that referenced this pull request Sep 25, 2025
This exposes the destination of an ongoing navigation.

Spec PR: whatwg/html#11692
I2P: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/68d4ff4d.2b0a0220.29ae18.0091.GAE%40google.com

[email protected]

Bug: 447171238
Change-Id: I1d2fbb7c0b7f2656ca4392be4d1beac34d9012ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6982944
Reviewed-by: Nate Chapin <[email protected]>
Commit-Queue: Noam Rosenthal <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1520724}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 25, 2025
This exposes the destination of an ongoing navigation.

Spec PR: whatwg/html#11692
I2P: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/68d4ff4d.2b0a0220.29ae18.0091.GAE%40google.com

[email protected]

Bug: 447171238
Change-Id: I1d2fbb7c0b7f2656ca4392be4d1beac34d9012ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6982944
Reviewed-by: Nate Chapin <[email protected]>
Commit-Queue: Noam Rosenthal <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1520724}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Sep 25, 2025
This exposes the destination of an ongoing navigation.

Spec PR: whatwg/html#11692
I2P: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/68d4ff4d.2b0a0220.29ae18.0091.GAE%40google.com

[email protected]

Bug: 447171238
Change-Id: I1d2fbb7c0b7f2656ca4392be4d1beac34d9012ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6982944
Reviewed-by: Nate Chapin <[email protected]>
Commit-Queue: Noam Rosenthal <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1520724}
@noamr
Copy link
Collaborator Author

noamr commented Oct 1, 2025

@zcorpan can I mark it as "two implementers interested"? People said it was reasonable but I want to make sure. If so, I'll open implementation bugs and fill in the rest of the checkboxes.

@zcorpan
Copy link
Member

zcorpan commented Oct 1, 2025

Yes. Thanks!

@noamr
Copy link
Collaborator Author

noamr commented Oct 6, 2025

I think this can be merged.

lando-prod-mozilla bot pushed a commit to mozilla-firefox/firefox that referenced this pull request Oct 7, 2025
Automatic update from web-platform-tests
Expose navigation.transition.to

This exposes the destination of an ongoing navigation.

Spec PR: whatwg/html#11692
I2P: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/68d4ff4d.2b0a0220.29ae18.0091.GAE%40google.com

[email protected]

Bug: 447171238
Change-Id: I1d2fbb7c0b7f2656ca4392be4d1beac34d9012ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6982944
Reviewed-by: Nate Chapin <[email protected]>
Commit-Queue: Noam Rosenthal <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1520724}

--

wpt-commits: 2688294120cb74f80bdd9959e8f6bcb8c731c98f
wpt-pr: 55066
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 8, 2025
Automatic update from web-platform-tests
Expose navigation.transition.to

This exposes the destination of an ongoing navigation.

Spec PR: whatwg/html#11692
I2P: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/68d4ff4d.2b0a0220.29ae18.0091.GAE%40google.com

R=japhetchromium.org

Bug: 447171238
Change-Id: I1d2fbb7c0b7f2656ca4392be4d1beac34d9012ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6982944
Reviewed-by: Nate Chapin <japhetchromium.org>
Commit-Queue: Noam Rosenthal <nrosenthalgoogle.com>
Cr-Commit-Position: refs/heads/main{#1520724}

--

wpt-commits: 2688294120cb74f80bdd9959e8f6bcb8c731c98f
wpt-pr: 55066

UltraBlame original commit: afab78513b2fbac59a141ab3f09c4d0239be15f5
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 8, 2025
Automatic update from web-platform-tests
Expose navigation.transition.to

This exposes the destination of an ongoing navigation.

Spec PR: whatwg/html#11692
I2P: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/68d4ff4d.2b0a0220.29ae18.0091.GAE%40google.com

R=japhetchromium.org

Bug: 447171238
Change-Id: I1d2fbb7c0b7f2656ca4392be4d1beac34d9012ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6982944
Reviewed-by: Nate Chapin <japhetchromium.org>
Commit-Queue: Noam Rosenthal <nrosenthalgoogle.com>
Cr-Commit-Position: refs/heads/main{#1520724}

--

wpt-commits: 2688294120cb74f80bdd9959e8f6bcb8c731c98f
wpt-pr: 55066

UltraBlame original commit: afab78513b2fbac59a141ab3f09c4d0239be15f5
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 8, 2025
Automatic update from web-platform-tests
Expose navigation.transition.to

This exposes the destination of an ongoing navigation.

Spec PR: whatwg/html#11692
I2P: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/68d4ff4d.2b0a0220.29ae18.0091.GAE%40google.com

R=japhetchromium.org

Bug: 447171238
Change-Id: I1d2fbb7c0b7f2656ca4392be4d1beac34d9012ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6982944
Reviewed-by: Nate Chapin <japhetchromium.org>
Commit-Queue: Noam Rosenthal <nrosenthalgoogle.com>
Cr-Commit-Position: refs/heads/main{#1520724}

--

wpt-commits: 2688294120cb74f80bdd9959e8f6bcb8c731c98f
wpt-pr: 55066

UltraBlame original commit: afab78513b2fbac59a141ab3f09c4d0239be15f5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add to or destination to NavigationTransition
4 participants